#include <iostream>

using namespace std;

int findPrimesTest()
{
	int n = 100;
	bool *primes = new bool[n+1];
	int i, j;

	for (i = 0; i <=n ; i++)
		primes[i] = true;
	primes[0] = primes[1] = false;

	for (i = 2; i <= n; i++){
		if ( primes[i] ){
			for (j = i * i ; j <=n; j += i)
				primes[j] = false;
		}
	}

	for (i = 0; i <=n; i++){
		if (primes[i])
			cout <<i <<" ";
	}
	cout <<endl;
	cin.get();

	return 0;
}